﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Birthday_Finder
{
    public partial class BirthdayFindForm : Form
    {
        public BirthdayFindForm()
        {
            InitializeComponent();
        }
        private void FindDay(int day, int month, int year)
        {
            DateTime birthday = new DateTime(year, month, day);
            string BirthdayOfWeek = birthday.DayOfWeek.ToString();
            MessageBox.Show("Your birthday was on a: " + BirthdayOfWeek,"Birthday Finder results:");
        }
        private void ContinueButton_Click(object sender, EventArgs e)
        {
            try
            {
                string day = DayData.Text;
                string month = MonthData.Text;
                string year = YearData.Text;
                int DAY = Convert.ToInt32(day);
                int MONTH = Convert.ToInt32(month);
                int YEAR = Convert.ToInt32(year);
                FindDay(DAY, MONTH, YEAR);
            }
            catch
            {
                MessageBox.Show("Incorrect data entered!!!!", "Error!!!");
            }
        }

        private void DetailedVerData_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("C2013 Taranoshi Nikari, License: Ms-PL(Microsoft Public License)","Bithday Finder Version 1.0");
        }
    }
}
